package com.eastfair.venueservice.service;

import com.eastfair.boot.service.SuperService;
import com.eastfair.venueservice.dto.WorkOvertimeRuleDTO;
import com.eastfair.venueservice.entity.WorkOvertimeRule;
import com.eastfair.venueservice.enumeration.WorkOvertimeRuleOvertimeTypeEnum;
import com.eastfair.venueservice.vo.WorkOvertimeRuleVO;

import java.util.List;

/**
 * <p>
 * 业务接口
 * 加班规则
 * </p>
 *
 * @author dqq
 * @date 2023-05-05
 */
public interface WorkOvertimeRuleService extends SuperService<WorkOvertimeRule> {

    /**
     * 查询加班规则列表VO.
     *
     * @param query the work overtime rule dto
     * @return the list
     */
    List<WorkOvertimeRuleVO> listWorkOvertimeRuleVO(WorkOvertimeRuleDTO query);

    /**
     * 查询加班规则.
     *
     * @param query the query
     * @return the list
     */
    List<WorkOvertimeRule> listWorkOvertimeRule(WorkOvertimeRuleDTO query);

    /**
     * 加班类型查询所有主场设置的规则.
     *
     * @param overtimeType the overtime type
     * @return the list
     */
    List<WorkOvertimeRule> listHomeRuleByOvertimeType(WorkOvertimeRuleOvertimeTypeEnum overtimeType);

    /**
     * id查询加班规则.
     *
     * @param id the id
     * @return the vo by id
     */
    WorkOvertimeRuleVO getVOById(Long id);

    /**
     * 加班类型查询场馆设置的加班规则.
     *
     * @param overtimeType the overtime type
     * @return the vo by venue overtime type
     */
    WorkOvertimeRuleVO getVOByVenueOvertimeType(WorkOvertimeRuleOvertimeTypeEnum overtimeType);

    /**
     * 加班规则类型，规格名称查询场馆的加班规则与规格
     *
     * @param overtimeType the overtime type
     * @param specName     the spec name
     * @return the vo by venue overtime type
     */
    WorkOvertimeRuleVO getVOByVenueOvertimeType(WorkOvertimeRuleOvertimeTypeEnum overtimeType, String specName);

    /**
     * 加班类型查询场馆设置的加班规则.
     *
     * @param overtimeType the overtime type
     * @return the by overtime type
     */
    WorkOvertimeRule getByVenueOvertimeType(WorkOvertimeRuleOvertimeTypeEnum overtimeType);

    /**
     * 加班类型查询主场设置的加班规则.
     *
     * @param overtimeType       the overtime type
     * @param exhibitionManageId the exhibition manage id
     * @param homeId             the home id
     * @return the by home overtime type
     */
    WorkOvertimeRule getByHomeOvertimeType(WorkOvertimeRuleOvertimeTypeEnum overtimeType, Long exhibitionManageId, Long homeId);

    /**
     * 加班类型查询主场设置的加班规则.
     *
     * @param overtimeType       the overtime type
     * @param exhibitionManageId the exhibition manage id
     * @param homeId             the home id
     * @return the vo by home overtime type
     */
    WorkOvertimeRuleVO getVOByHomeOvertimeType(WorkOvertimeRuleOvertimeTypeEnum overtimeType, Long exhibitionManageId, Long homeId);

    /**
     * 保存加班规则.
     *
     * @param workOvertimeRuleDTO the work overtime rule dto
     * @return the work overtime rule
     */
    WorkOvertimeRule saveWorkOvertimeRule(WorkOvertimeRuleDTO workOvertimeRuleDTO);

    /**
     * 场馆保存加班规则.
     *
     * @param workOvertimeRuleDTO the work overtime rule dto
     * @return the boolean
     */
    boolean saveForVenue(WorkOvertimeRuleDTO workOvertimeRuleDTO);

    /**
     * 主场保存加班规则.
     *
     * @param workOvertimeRuleDTO the work overtime rule dto
     * @return the boolean
     */
    boolean saveForHome(WorkOvertimeRuleDTO workOvertimeRuleDTO);

    /**
     * 更新加班规则.
     *
     * @param workOvertimeRuleDTO the work overtime rule dto
     * @return the work overtime rule
     */
    WorkOvertimeRule updateWorkOvertimeRule(WorkOvertimeRuleDTO workOvertimeRuleDTO);

    /**
     * 场馆更新加班规则.
     *
     * @param venueWorkOvertimeRuleDTO the work overtime rule dto
     * @return the work overtime rule
     */
    WorkOvertimeRule updateVenueWorkOvertimeRule(WorkOvertimeRuleDTO venueWorkOvertimeRuleDTO);

    /**
     * 场馆更新主场设置的规则
     *
     * @param venueRule the venue rule
     * @return the boolean
     */
    boolean updateHomeRuleByVenue(WorkOvertimeRule venueRule);

    /**
     * id删除加班规则.
     *
     * @param id the id
     * @return the boolean
     */
    boolean removeRuleById(Long id);
}
